//
//  LLAccountTool.m
//  Weibo
//
//  Created by 李灵斌 on 15-2-3.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "LLAccountTool.h"
#import "LLAccount.h"

#define LLFileName @"account.txt"
#define LLAccountFileInShaHe     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:LLFileName]
@implementation LLAccountTool

+ (void)save:(LLAccount *)account{
    
    [NSKeyedArchiver archiveRootObject:account toFile:LLAccountFileInShaHe];
}

+ (LLAccount *)readInShaHe{
    
   return [NSKeyedUnarchiver unarchiveObjectWithFile:LLAccountFileInShaHe];
}

@end
